
const CONFIG = {
    "path": "我的坚果云/autojs/",
    "scriptName":"main.js",
    "user": "1184664659@qq.com",
    "key": "a2kzfux56w4simyd"
}
threads.start(function(){while(true){toastLog("请稍等...脚本加载中...");sleep(4000);}});
try {
    http.__okhttp__.setTimeout(20000);
    let res = http.get('http://dav.jianguoyun.com/dav/'+CONFIG.path+CONFIG.scriptName, {
        headers: {
            "Authorization": "Basic " + java.lang.String(android.util.Base64.encode(java.lang.String(CONFIG.user +':'  + CONFIG.key).getBytes(), 2)),
            "Content-Type": "text/plain;charset=UTF-8",
            "Connection": "Keep-Alive",
            "Accept-Encoding": "gzip",
            "User-Agent": "okhttp/3.12.1"
            }
        }
    ).body.string();
    threads.shutDownAll();
    engines.execScript(CONFIG.scriptName,res);
} catch (error) {
    alert("加载超时,请重启脚本,请检查网络.或者该文件已经被作者删除~~~");
}